Left Termination of the query pattern qs_in_2(g, a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

qs([], []).
qs(cons(X, L), S) :- ','(split(L, X, L1, L2), ','(qs(L1, S1), ','(qs(L2, S2), append(S1, cons(X, S2), S)))).
append([], L, L).
append(cons(X, L1), L2, cons(X, L3)) :- append(L1, L2, L3).
split([], X, [], []).
split(cons(X, L), Y, cons(X, L1), L2) :- ','(less(X, Y), split(L, Y, L1, L2)).
split(cons(X, L), Y, L1, cons(X, L2)) :- ','(geq(X, Y), split(L, Y, L1, L2)).
less(0, s(X)).
less(s(X), s(Y)) :- less(X, Y).
geq(X, X).
geq(s(X), 0).
geq(s(X), s(Y)) :- geq(X, Y).

Queries:

qs(g,a).

We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

qs_in(cons(X, L), S) → U1(X, L, S, split_in(L, X, L1, L2))
split_in(cons(X, L), Y, L1, cons(X, L2)) → U8(X, L, Y, L1, L2, geq_in(X, Y))
geq_in(s(X), s(Y)) → U11(X, Y, geq_in(X, Y))
geq_in(s(X), 0) → geq_out(s(X), 0)
geq_in(X, X) → geq_out(X, X)
U11(X, Y, geq_out(X, Y)) → geq_out(s(X), s(Y))
U8(X, L, Y, L1, L2, geq_out(X, Y)) → U9(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in(cons(X, L), Y, cons(X, L1), L2) → U6(X, L, Y, L1, L2, less_in(X, Y))
less_in(s(X), s(Y)) → U10(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U10(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U6(X, L, Y, L1, L2, less_out(X, Y)) → U7(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in([], X, [], []) → split_out([], X, [], [])
U7(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, cons(X, L1), L2)
U9(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, L1, cons(X, L2))
U1(X, L, S, split_out(L, X, L1, L2)) → U2(X, L, S, L2, qs_in(L1, S1))
qs_in([], []) → qs_out([], [])
U2(X, L, S, L2, qs_out(L1, S1)) → U3(X, L, S, S1, qs_in(L2, S2))
U3(X, L, S, S1, qs_out(L2, S2)) → U4(X, L, S, append_in(S1, cons(X, S2), S))
append_in(cons(X, L1), L2, cons(X, L3)) → U5(X, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U5(X, L1, L2, L3, append_out(L1, L2, L3)) → append_out(cons(X, L1), L2, cons(X, L3))
U4(X, L, S, append_out(S1, cons(X, S2), S)) → qs_out(cons(X, L), S)

The argument filtering Pi contains the following mapping:
qs_in(x1, x2)  =  qs_in(x1)
cons(x1, x2)  =  cons(x1, x2)
U1(x1, x2, x3, x4)  =  U1(x1, x4)
split_in(x1, x2, x3, x4)  =  split_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6)  =  U8(x1, x2, x3, x6)
geq_in(x1, x2)  =  geq_in(x1, x2)
s(x1)  =  s(x1)
U11(x1, x2, x3)  =  U11(x3)
0  =  0
geq_out(x1, x2)  =  geq_out
U9(x1, x2, x3, x4, x5, x6)  =  U9(x1, x6)
U6(x1, x2, x3, x4, x5, x6)  =  U6(x1, x2, x3, x6)
less_in(x1, x2)  =  less_in(x1, x2)
U10(x1, x2, x3)  =  U10(x3)
less_out(x1, x2)  =  less_out
U7(x1, x2, x3, x4, x5, x6)  =  U7(x1, x6)
[]  =  []
split_out(x1, x2, x3, x4)  =  split_out(x3, x4)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x4, x5)
qs_out(x1, x2)  =  qs_out(x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x4, x5)
U4(x1, x2, x3, x4)  =  U4(x4)
append_in(x1, x2, x3)  =  append_in(x1, x2)
U5(x1, x2, x3, x4, x5)  =  U5(x1, x5)
append_out(x1, x2, x3)  =  append_out(x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

qs_in(cons(X, L), S) → U1(X, L, S, split_in(L, X, L1, L2))
split_in(cons(X, L), Y, L1, cons(X, L2)) → U8(X, L, Y, L1, L2, geq_in(X, Y))
geq_in(s(X), s(Y)) → U11(X, Y, geq_in(X, Y))
geq_in(s(X), 0) → geq_out(s(X), 0)
geq_in(X, X) → geq_out(X, X)
U11(X, Y, geq_out(X, Y)) → geq_out(s(X), s(Y))
U8(X, L, Y, L1, L2, geq_out(X, Y)) → U9(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in(cons(X, L), Y, cons(X, L1), L2) → U6(X, L, Y, L1, L2, less_in(X, Y))
less_in(s(X), s(Y)) → U10(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U10(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U6(X, L, Y, L1, L2, less_out(X, Y)) → U7(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in([], X, [], []) → split_out([], X, [], [])
U7(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, cons(X, L1), L2)
U9(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, L1, cons(X, L2))
U1(X, L, S, split_out(L, X, L1, L2)) → U2(X, L, S, L2, qs_in(L1, S1))
qs_in([], []) → qs_out([], [])
U2(X, L, S, L2, qs_out(L1, S1)) → U3(X, L, S, S1, qs_in(L2, S2))
U3(X, L, S, S1, qs_out(L2, S2)) → U4(X, L, S, append_in(S1, cons(X, S2), S))
append_in(cons(X, L1), L2, cons(X, L3)) → U5(X, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U5(X, L1, L2, L3, append_out(L1, L2, L3)) → append_out(cons(X, L1), L2, cons(X, L3))
U4(X, L, S, append_out(S1, cons(X, S2), S)) → qs_out(cons(X, L), S)

The argument filtering Pi contains the following mapping:
qs_in(x1, x2)  =  qs_in(x1)
cons(x1, x2)  =  cons(x1, x2)
U1(x1, x2, x3, x4)  =  U1(x1, x4)
split_in(x1, x2, x3, x4)  =  split_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6)  =  U8(x1, x2, x3, x6)
geq_in(x1, x2)  =  geq_in(x1, x2)
s(x1)  =  s(x1)
U11(x1, x2, x3)  =  U11(x3)
0  =  0
geq_out(x1, x2)  =  geq_out
U9(x1, x2, x3, x4, x5, x6)  =  U9(x1, x6)
U6(x1, x2, x3, x4, x5, x6)  =  U6(x1, x2, x3, x6)
less_in(x1, x2)  =  less_in(x1, x2)
U10(x1, x2, x3)  =  U10(x3)
less_out(x1, x2)  =  less_out
U7(x1, x2, x3, x4, x5, x6)  =  U7(x1, x6)
[]  =  []
split_out(x1, x2, x3, x4)  =  split_out(x3, x4)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x4, x5)
qs_out(x1, x2)  =  qs_out(x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x4, x5)
U4(x1, x2, x3, x4)  =  U4(x4)
append_in(x1, x2, x3)  =  append_in(x1, x2)
U5(x1, x2, x3, x4, x5)  =  U5(x1, x5)
append_out(x1, x2, x3)  =  append_out(x3)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

QS_IN(cons(X, L), S) → U11(X, L, S, split_in(L, X, L1, L2))
QS_IN(cons(X, L), S) → SPLIT_IN(L, X, L1, L2)
SPLIT_IN(cons(X, L), Y, L1, cons(X, L2)) → U81(X, L, Y, L1, L2, geq_in(X, Y))
SPLIT_IN(cons(X, L), Y, L1, cons(X, L2)) → GEQ_IN(X, Y)
GEQ_IN(s(X), s(Y)) → U111(X, Y, geq_in(X, Y))
GEQ_IN(s(X), s(Y)) → GEQ_IN(X, Y)
U81(X, L, Y, L1, L2, geq_out(X, Y)) → U91(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
U81(X, L, Y, L1, L2, geq_out(X, Y)) → SPLIT_IN(L, Y, L1, L2)
SPLIT_IN(cons(X, L), Y, cons(X, L1), L2) → U61(X, L, Y, L1, L2, less_in(X, Y))
SPLIT_IN(cons(X, L), Y, cons(X, L1), L2) → LESS_IN(X, Y)
LESS_IN(s(X), s(Y)) → U101(X, Y, less_in(X, Y))
LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)
U61(X, L, Y, L1, L2, less_out(X, Y)) → U71(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
U61(X, L, Y, L1, L2, less_out(X, Y)) → SPLIT_IN(L, Y, L1, L2)
U11(X, L, S, split_out(L, X, L1, L2)) → U21(X, L, S, L2, qs_in(L1, S1))
U11(X, L, S, split_out(L, X, L1, L2)) → QS_IN(L1, S1)
U21(X, L, S, L2, qs_out(L1, S1)) → U31(X, L, S, S1, qs_in(L2, S2))
U21(X, L, S, L2, qs_out(L1, S1)) → QS_IN(L2, S2)
U31(X, L, S, S1, qs_out(L2, S2)) → U41(X, L, S, append_in(S1, cons(X, S2), S))
U31(X, L, S, S1, qs_out(L2, S2)) → APPEND_IN(S1, cons(X, S2), S)
APPEND_IN(cons(X, L1), L2, cons(X, L3)) → U51(X, L1, L2, L3, append_in(L1, L2, L3))
APPEND_IN(cons(X, L1), L2, cons(X, L3)) → APPEND_IN(L1, L2, L3)

The TRS R consists of the following rules:

qs_in(cons(X, L), S) → U1(X, L, S, split_in(L, X, L1, L2))
split_in(cons(X, L), Y, L1, cons(X, L2)) → U8(X, L, Y, L1, L2, geq_in(X, Y))
geq_in(s(X), s(Y)) → U11(X, Y, geq_in(X, Y))
geq_in(s(X), 0) → geq_out(s(X), 0)
geq_in(X, X) → geq_out(X, X)
U11(X, Y, geq_out(X, Y)) → geq_out(s(X), s(Y))
U8(X, L, Y, L1, L2, geq_out(X, Y)) → U9(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in(cons(X, L), Y, cons(X, L1), L2) → U6(X, L, Y, L1, L2, less_in(X, Y))
less_in(s(X), s(Y)) → U10(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U10(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U6(X, L, Y, L1, L2, less_out(X, Y)) → U7(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in([], X, [], []) → split_out([], X, [], [])
U7(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, cons(X, L1), L2)
U9(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, L1, cons(X, L2))
U1(X, L, S, split_out(L, X, L1, L2)) → U2(X, L, S, L2, qs_in(L1, S1))
qs_in([], []) → qs_out([], [])
U2(X, L, S, L2, qs_out(L1, S1)) → U3(X, L, S, S1, qs_in(L2, S2))
U3(X, L, S, S1, qs_out(L2, S2)) → U4(X, L, S, append_in(S1, cons(X, S2), S))
append_in(cons(X, L1), L2, cons(X, L3)) → U5(X, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U5(X, L1, L2, L3, append_out(L1, L2, L3)) → append_out(cons(X, L1), L2, cons(X, L3))
U4(X, L, S, append_out(S1, cons(X, S2), S)) → qs_out(cons(X, L), S)

The argument filtering Pi contains the following mapping:
qs_in(x1, x2)  =  qs_in(x1)
cons(x1, x2)  =  cons(x1, x2)
U1(x1, x2, x3, x4)  =  U1(x1, x4)
split_in(x1, x2, x3, x4)  =  split_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6)  =  U8(x1, x2, x3, x6)
geq_in(x1, x2)  =  geq_in(x1, x2)
s(x1)  =  s(x1)
U11(x1, x2, x3)  =  U11(x3)
0  =  0
geq_out(x1, x2)  =  geq_out
U9(x1, x2, x3, x4, x5, x6)  =  U9(x1, x6)
U6(x1, x2, x3, x4, x5, x6)  =  U6(x1, x2, x3, x6)
less_in(x1, x2)  =  less_in(x1, x2)
U10(x1, x2, x3)  =  U10(x3)
less_out(x1, x2)  =  less_out
U7(x1, x2, x3, x4, x5, x6)  =  U7(x1, x6)
[]  =  []
split_out(x1, x2, x3, x4)  =  split_out(x3, x4)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x4, x5)
qs_out(x1, x2)  =  qs_out(x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x4, x5)
U4(x1, x2, x3, x4)  =  U4(x4)
append_in(x1, x2, x3)  =  append_in(x1, x2)
U5(x1, x2, x3, x4, x5)  =  U5(x1, x5)
append_out(x1, x2, x3)  =  append_out(x3)
U111(x1, x2, x3)  =  U111(x3)
U41(x1, x2, x3, x4)  =  U41(x4)
APPEND_IN(x1, x2, x3)  =  APPEND_IN(x1, x2)
U31(x1, x2, x3, x4, x5)  =  U31(x1, x4, x5)
U81(x1, x2, x3, x4, x5, x6)  =  U81(x1, x2, x3, x6)
QS_IN(x1, x2)  =  QS_IN(x1)
U71(x1, x2, x3, x4, x5, x6)  =  U71(x1, x6)
LESS_IN(x1, x2)  =  LESS_IN(x1, x2)
SPLIT_IN(x1, x2, x3, x4)  =  SPLIT_IN(x1, x2)
U51(x1, x2, x3, x4, x5)  =  U51(x1, x5)
U101(x1, x2, x3)  =  U101(x3)
GEQ_IN(x1, x2)  =  GEQ_IN(x1, x2)
U91(x1, x2, x3, x4, x5, x6)  =  U91(x1, x6)
U21(x1, x2, x3, x4, x5)  =  U21(x1, x4, x5)
U11(x1, x2, x3, x4)  =  U11(x1, x4)
U61(x1, x2, x3, x4, x5, x6)  =  U61(x1, x2, x3, x6)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

QS_IN(cons(X, L), S) → U11(X, L, S, split_in(L, X, L1, L2))
QS_IN(cons(X, L), S) → SPLIT_IN(L, X, L1, L2)
SPLIT_IN(cons(X, L), Y, L1, cons(X, L2)) → U81(X, L, Y, L1, L2, geq_in(X, Y))
SPLIT_IN(cons(X, L), Y, L1, cons(X, L2)) → GEQ_IN(X, Y)
GEQ_IN(s(X), s(Y)) → U111(X, Y, geq_in(X, Y))
GEQ_IN(s(X), s(Y)) → GEQ_IN(X, Y)
U81(X, L, Y, L1, L2, geq_out(X, Y)) → U91(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
U81(X, L, Y, L1, L2, geq_out(X, Y)) → SPLIT_IN(L, Y, L1, L2)
SPLIT_IN(cons(X, L), Y, cons(X, L1), L2) → U61(X, L, Y, L1, L2, less_in(X, Y))
SPLIT_IN(cons(X, L), Y, cons(X, L1), L2) → LESS_IN(X, Y)
LESS_IN(s(X), s(Y)) → U101(X, Y, less_in(X, Y))
LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)
U61(X, L, Y, L1, L2, less_out(X, Y)) → U71(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
U61(X, L, Y, L1, L2, less_out(X, Y)) → SPLIT_IN(L, Y, L1, L2)
U11(X, L, S, split_out(L, X, L1, L2)) → U21(X, L, S, L2, qs_in(L1, S1))
U11(X, L, S, split_out(L, X, L1, L2)) → QS_IN(L1, S1)
U21(X, L, S, L2, qs_out(L1, S1)) → U31(X, L, S, S1, qs_in(L2, S2))
U21(X, L, S, L2, qs_out(L1, S1)) → QS_IN(L2, S2)
U31(X, L, S, S1, qs_out(L2, S2)) → U41(X, L, S, append_in(S1, cons(X, S2), S))
U31(X, L, S, S1, qs_out(L2, S2)) → APPEND_IN(S1, cons(X, S2), S)
APPEND_IN(cons(X, L1), L2, cons(X, L3)) → U51(X, L1, L2, L3, append_in(L1, L2, L3))
APPEND_IN(cons(X, L1), L2, cons(X, L3)) → APPEND_IN(L1, L2, L3)

The TRS R consists of the following rules:

qs_in(cons(X, L), S) → U1(X, L, S, split_in(L, X, L1, L2))
split_in(cons(X, L), Y, L1, cons(X, L2)) → U8(X, L, Y, L1, L2, geq_in(X, Y))
geq_in(s(X), s(Y)) → U11(X, Y, geq_in(X, Y))
geq_in(s(X), 0) → geq_out(s(X), 0)
geq_in(X, X) → geq_out(X, X)
U11(X, Y, geq_out(X, Y)) → geq_out(s(X), s(Y))
U8(X, L, Y, L1, L2, geq_out(X, Y)) → U9(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in(cons(X, L), Y, cons(X, L1), L2) → U6(X, L, Y, L1, L2, less_in(X, Y))
less_in(s(X), s(Y)) → U10(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U10(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U6(X, L, Y, L1, L2, less_out(X, Y)) → U7(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in([], X, [], []) → split_out([], X, [], [])
U7(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, cons(X, L1), L2)
U9(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, L1, cons(X, L2))
U1(X, L, S, split_out(L, X, L1, L2)) → U2(X, L, S, L2, qs_in(L1, S1))
qs_in([], []) → qs_out([], [])
U2(X, L, S, L2, qs_out(L1, S1)) → U3(X, L, S, S1, qs_in(L2, S2))
U3(X, L, S, S1, qs_out(L2, S2)) → U4(X, L, S, append_in(S1, cons(X, S2), S))
append_in(cons(X, L1), L2, cons(X, L3)) → U5(X, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U5(X, L1, L2, L3, append_out(L1, L2, L3)) → append_out(cons(X, L1), L2, cons(X, L3))
U4(X, L, S, append_out(S1, cons(X, S2), S)) → qs_out(cons(X, L), S)

The argument filtering Pi contains the following mapping:
qs_in(x1, x2)  =  qs_in(x1)
cons(x1, x2)  =  cons(x1, x2)
U1(x1, x2, x3, x4)  =  U1(x1, x4)
split_in(x1, x2, x3, x4)  =  split_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6)  =  U8(x1, x2, x3, x6)
geq_in(x1, x2)  =  geq_in(x1, x2)
s(x1)  =  s(x1)
U11(x1, x2, x3)  =  U11(x3)
0  =  0
geq_out(x1, x2)  =  geq_out
U9(x1, x2, x3, x4, x5, x6)  =  U9(x1, x6)
U6(x1, x2, x3, x4, x5, x6)  =  U6(x1, x2, x3, x6)
less_in(x1, x2)  =  less_in(x1, x2)
U10(x1, x2, x3)  =  U10(x3)
less_out(x1, x2)  =  less_out
U7(x1, x2, x3, x4, x5, x6)  =  U7(x1, x6)
[]  =  []
split_out(x1, x2, x3, x4)  =  split_out(x3, x4)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x4, x5)
qs_out(x1, x2)  =  qs_out(x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x4, x5)
U4(x1, x2, x3, x4)  =  U4(x4)
append_in(x1, x2, x3)  =  append_in(x1, x2)
U5(x1, x2, x3, x4, x5)  =  U5(x1, x5)
append_out(x1, x2, x3)  =  append_out(x3)
U111(x1, x2, x3)  =  U111(x3)
U41(x1, x2, x3, x4)  =  U41(x4)
APPEND_IN(x1, x2, x3)  =  APPEND_IN(x1, x2)
U31(x1, x2, x3, x4, x5)  =  U31(x1, x4, x5)
U81(x1, x2, x3, x4, x5, x6)  =  U81(x1, x2, x3, x6)
QS_IN(x1, x2)  =  QS_IN(x1)
U71(x1, x2, x3, x4, x5, x6)  =  U71(x1, x6)
LESS_IN(x1, x2)  =  LESS_IN(x1, x2)
SPLIT_IN(x1, x2, x3, x4)  =  SPLIT_IN(x1, x2)
U51(x1, x2, x3, x4, x5)  =  U51(x1, x5)
U101(x1, x2, x3)  =  U101(x3)
GEQ_IN(x1, x2)  =  GEQ_IN(x1, x2)
U91(x1, x2, x3, x4, x5, x6)  =  U91(x1, x6)
U21(x1, x2, x3, x4, x5)  =  U21(x1, x4, x5)
U11(x1, x2, x3, x4)  =  U11(x1, x4)
U61(x1, x2, x3, x4, x5, x6)  =  U61(x1, x2, x3, x6)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 5 SCCs with 11 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND_IN(cons(X, L1), L2, cons(X, L3)) → APPEND_IN(L1, L2, L3)

The TRS R consists of the following rules:

qs_in(cons(X, L), S) → U1(X, L, S, split_in(L, X, L1, L2))
split_in(cons(X, L), Y, L1, cons(X, L2)) → U8(X, L, Y, L1, L2, geq_in(X, Y))
geq_in(s(X), s(Y)) → U11(X, Y, geq_in(X, Y))
geq_in(s(X), 0) → geq_out(s(X), 0)
geq_in(X, X) → geq_out(X, X)
U11(X, Y, geq_out(X, Y)) → geq_out(s(X), s(Y))
U8(X, L, Y, L1, L2, geq_out(X, Y)) → U9(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in(cons(X, L), Y, cons(X, L1), L2) → U6(X, L, Y, L1, L2, less_in(X, Y))
less_in(s(X), s(Y)) → U10(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U10(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U6(X, L, Y, L1, L2, less_out(X, Y)) → U7(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in([], X, [], []) → split_out([], X, [], [])
U7(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, cons(X, L1), L2)
U9(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, L1, cons(X, L2))
U1(X, L, S, split_out(L, X, L1, L2)) → U2(X, L, S, L2, qs_in(L1, S1))
qs_in([], []) → qs_out([], [])
U2(X, L, S, L2, qs_out(L1, S1)) → U3(X, L, S, S1, qs_in(L2, S2))
U3(X, L, S, S1, qs_out(L2, S2)) → U4(X, L, S, append_in(S1, cons(X, S2), S))
append_in(cons(X, L1), L2, cons(X, L3)) → U5(X, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U5(X, L1, L2, L3, append_out(L1, L2, L3)) → append_out(cons(X, L1), L2, cons(X, L3))
U4(X, L, S, append_out(S1, cons(X, S2), S)) → qs_out(cons(X, L), S)

The argument filtering Pi contains the following mapping:
qs_in(x1, x2)  =  qs_in(x1)
cons(x1, x2)  =  cons(x1, x2)
U1(x1, x2, x3, x4)  =  U1(x1, x4)
split_in(x1, x2, x3, x4)  =  split_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6)  =  U8(x1, x2, x3, x6)
geq_in(x1, x2)  =  geq_in(x1, x2)
s(x1)  =  s(x1)
U11(x1, x2, x3)  =  U11(x3)
0  =  0
geq_out(x1, x2)  =  geq_out
U9(x1, x2, x3, x4, x5, x6)  =  U9(x1, x6)
U6(x1, x2, x3, x4, x5, x6)  =  U6(x1, x2, x3, x6)
less_in(x1, x2)  =  less_in(x1, x2)
U10(x1, x2, x3)  =  U10(x3)
less_out(x1, x2)  =  less_out
U7(x1, x2, x3, x4, x5, x6)  =  U7(x1, x6)
[]  =  []
split_out(x1, x2, x3, x4)  =  split_out(x3, x4)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x4, x5)
qs_out(x1, x2)  =  qs_out(x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x4, x5)
U4(x1, x2, x3, x4)  =  U4(x4)
append_in(x1, x2, x3)  =  append_in(x1, x2)
U5(x1, x2, x3, x4, x5)  =  U5(x1, x5)
append_out(x1, x2, x3)  =  append_out(x3)
APPEND_IN(x1, x2, x3)  =  APPEND_IN(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND_IN(cons(X, L1), L2, cons(X, L3)) → APPEND_IN(L1, L2, L3)

R is empty.
The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons(x1, x2)
APPEND_IN(x1, x2, x3)  =  APPEND_IN(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APPEND_IN(cons(X, L1), L2) → APPEND_IN(L1, L2)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)

The TRS R consists of the following rules:

qs_in(cons(X, L), S) → U1(X, L, S, split_in(L, X, L1, L2))
split_in(cons(X, L), Y, L1, cons(X, L2)) → U8(X, L, Y, L1, L2, geq_in(X, Y))
geq_in(s(X), s(Y)) → U11(X, Y, geq_in(X, Y))
geq_in(s(X), 0) → geq_out(s(X), 0)
geq_in(X, X) → geq_out(X, X)
U11(X, Y, geq_out(X, Y)) → geq_out(s(X), s(Y))
U8(X, L, Y, L1, L2, geq_out(X, Y)) → U9(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in(cons(X, L), Y, cons(X, L1), L2) → U6(X, L, Y, L1, L2, less_in(X, Y))
less_in(s(X), s(Y)) → U10(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U10(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U6(X, L, Y, L1, L2, less_out(X, Y)) → U7(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in([], X, [], []) → split_out([], X, [], [])
U7(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, cons(X, L1), L2)
U9(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, L1, cons(X, L2))
U1(X, L, S, split_out(L, X, L1, L2)) → U2(X, L, S, L2, qs_in(L1, S1))
qs_in([], []) → qs_out([], [])
U2(X, L, S, L2, qs_out(L1, S1)) → U3(X, L, S, S1, qs_in(L2, S2))
U3(X, L, S, S1, qs_out(L2, S2)) → U4(X, L, S, append_in(S1, cons(X, S2), S))
append_in(cons(X, L1), L2, cons(X, L3)) → U5(X, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U5(X, L1, L2, L3, append_out(L1, L2, L3)) → append_out(cons(X, L1), L2, cons(X, L3))
U4(X, L, S, append_out(S1, cons(X, S2), S)) → qs_out(cons(X, L), S)

The argument filtering Pi contains the following mapping:
qs_in(x1, x2)  =  qs_in(x1)
cons(x1, x2)  =  cons(x1, x2)
U1(x1, x2, x3, x4)  =  U1(x1, x4)
split_in(x1, x2, x3, x4)  =  split_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6)  =  U8(x1, x2, x3, x6)
geq_in(x1, x2)  =  geq_in(x1, x2)
s(x1)  =  s(x1)
U11(x1, x2, x3)  =  U11(x3)
0  =  0
geq_out(x1, x2)  =  geq_out
U9(x1, x2, x3, x4, x5, x6)  =  U9(x1, x6)
U6(x1, x2, x3, x4, x5, x6)  =  U6(x1, x2, x3, x6)
less_in(x1, x2)  =  less_in(x1, x2)
U10(x1, x2, x3)  =  U10(x3)
less_out(x1, x2)  =  less_out
U7(x1, x2, x3, x4, x5, x6)  =  U7(x1, x6)
[]  =  []
split_out(x1, x2, x3, x4)  =  split_out(x3, x4)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x4, x5)
qs_out(x1, x2)  =  qs_out(x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x4, x5)
U4(x1, x2, x3, x4)  =  U4(x4)
append_in(x1, x2, x3)  =  append_in(x1, x2)
U5(x1, x2, x3, x4, x5)  =  U5(x1, x5)
append_out(x1, x2, x3)  =  append_out(x3)
LESS_IN(x1, x2)  =  LESS_IN(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

LESS_IN(s(X), s(Y)) → LESS_IN(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

GEQ_IN(s(X), s(Y)) → GEQ_IN(X, Y)

The TRS R consists of the following rules:

qs_in(cons(X, L), S) → U1(X, L, S, split_in(L, X, L1, L2))
split_in(cons(X, L), Y, L1, cons(X, L2)) → U8(X, L, Y, L1, L2, geq_in(X, Y))
geq_in(s(X), s(Y)) → U11(X, Y, geq_in(X, Y))
geq_in(s(X), 0) → geq_out(s(X), 0)
geq_in(X, X) → geq_out(X, X)
U11(X, Y, geq_out(X, Y)) → geq_out(s(X), s(Y))
U8(X, L, Y, L1, L2, geq_out(X, Y)) → U9(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in(cons(X, L), Y, cons(X, L1), L2) → U6(X, L, Y, L1, L2, less_in(X, Y))
less_in(s(X), s(Y)) → U10(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U10(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U6(X, L, Y, L1, L2, less_out(X, Y)) → U7(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in([], X, [], []) → split_out([], X, [], [])
U7(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, cons(X, L1), L2)
U9(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, L1, cons(X, L2))
U1(X, L, S, split_out(L, X, L1, L2)) → U2(X, L, S, L2, qs_in(L1, S1))
qs_in([], []) → qs_out([], [])
U2(X, L, S, L2, qs_out(L1, S1)) → U3(X, L, S, S1, qs_in(L2, S2))
U3(X, L, S, S1, qs_out(L2, S2)) → U4(X, L, S, append_in(S1, cons(X, S2), S))
append_in(cons(X, L1), L2, cons(X, L3)) → U5(X, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U5(X, L1, L2, L3, append_out(L1, L2, L3)) → append_out(cons(X, L1), L2, cons(X, L3))
U4(X, L, S, append_out(S1, cons(X, S2), S)) → qs_out(cons(X, L), S)

The argument filtering Pi contains the following mapping:
qs_in(x1, x2)  =  qs_in(x1)
cons(x1, x2)  =  cons(x1, x2)
U1(x1, x2, x3, x4)  =  U1(x1, x4)
split_in(x1, x2, x3, x4)  =  split_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6)  =  U8(x1, x2, x3, x6)
geq_in(x1, x2)  =  geq_in(x1, x2)
s(x1)  =  s(x1)
U11(x1, x2, x3)  =  U11(x3)
0  =  0
geq_out(x1, x2)  =  geq_out
U9(x1, x2, x3, x4, x5, x6)  =  U9(x1, x6)
U6(x1, x2, x3, x4, x5, x6)  =  U6(x1, x2, x3, x6)
less_in(x1, x2)  =  less_in(x1, x2)
U10(x1, x2, x3)  =  U10(x3)
less_out(x1, x2)  =  less_out
U7(x1, x2, x3, x4, x5, x6)  =  U7(x1, x6)
[]  =  []
split_out(x1, x2, x3, x4)  =  split_out(x3, x4)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x4, x5)
qs_out(x1, x2)  =  qs_out(x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x4, x5)
U4(x1, x2, x3, x4)  =  U4(x4)
append_in(x1, x2, x3)  =  append_in(x1, x2)
U5(x1, x2, x3, x4, x5)  =  U5(x1, x5)
append_out(x1, x2, x3)  =  append_out(x3)
GEQ_IN(x1, x2)  =  GEQ_IN(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

GEQ_IN(s(X), s(Y)) → GEQ_IN(X, Y)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

GEQ_IN(s(X), s(Y)) → GEQ_IN(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

SPLIT_IN(cons(X, L), Y, cons(X, L1), L2) → U61(X, L, Y, L1, L2, less_in(X, Y))
SPLIT_IN(cons(X, L), Y, L1, cons(X, L2)) → U81(X, L, Y, L1, L2, geq_in(X, Y))
U81(X, L, Y, L1, L2, geq_out(X, Y)) → SPLIT_IN(L, Y, L1, L2)
U61(X, L, Y, L1, L2, less_out(X, Y)) → SPLIT_IN(L, Y, L1, L2)

The TRS R consists of the following rules:

qs_in(cons(X, L), S) → U1(X, L, S, split_in(L, X, L1, L2))
split_in(cons(X, L), Y, L1, cons(X, L2)) → U8(X, L, Y, L1, L2, geq_in(X, Y))
geq_in(s(X), s(Y)) → U11(X, Y, geq_in(X, Y))
geq_in(s(X), 0) → geq_out(s(X), 0)
geq_in(X, X) → geq_out(X, X)
U11(X, Y, geq_out(X, Y)) → geq_out(s(X), s(Y))
U8(X, L, Y, L1, L2, geq_out(X, Y)) → U9(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in(cons(X, L), Y, cons(X, L1), L2) → U6(X, L, Y, L1, L2, less_in(X, Y))
less_in(s(X), s(Y)) → U10(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U10(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U6(X, L, Y, L1, L2, less_out(X, Y)) → U7(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in([], X, [], []) → split_out([], X, [], [])
U7(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, cons(X, L1), L2)
U9(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, L1, cons(X, L2))
U1(X, L, S, split_out(L, X, L1, L2)) → U2(X, L, S, L2, qs_in(L1, S1))
qs_in([], []) → qs_out([], [])
U2(X, L, S, L2, qs_out(L1, S1)) → U3(X, L, S, S1, qs_in(L2, S2))
U3(X, L, S, S1, qs_out(L2, S2)) → U4(X, L, S, append_in(S1, cons(X, S2), S))
append_in(cons(X, L1), L2, cons(X, L3)) → U5(X, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U5(X, L1, L2, L3, append_out(L1, L2, L3)) → append_out(cons(X, L1), L2, cons(X, L3))
U4(X, L, S, append_out(S1, cons(X, S2), S)) → qs_out(cons(X, L), S)

The argument filtering Pi contains the following mapping:
qs_in(x1, x2)  =  qs_in(x1)
cons(x1, x2)  =  cons(x1, x2)
U1(x1, x2, x3, x4)  =  U1(x1, x4)
split_in(x1, x2, x3, x4)  =  split_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6)  =  U8(x1, x2, x3, x6)
geq_in(x1, x2)  =  geq_in(x1, x2)
s(x1)  =  s(x1)
U11(x1, x2, x3)  =  U11(x3)
0  =  0
geq_out(x1, x2)  =  geq_out
U9(x1, x2, x3, x4, x5, x6)  =  U9(x1, x6)
U6(x1, x2, x3, x4, x5, x6)  =  U6(x1, x2, x3, x6)
less_in(x1, x2)  =  less_in(x1, x2)
U10(x1, x2, x3)  =  U10(x3)
less_out(x1, x2)  =  less_out
U7(x1, x2, x3, x4, x5, x6)  =  U7(x1, x6)
[]  =  []
split_out(x1, x2, x3, x4)  =  split_out(x3, x4)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x4, x5)
qs_out(x1, x2)  =  qs_out(x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x4, x5)
U4(x1, x2, x3, x4)  =  U4(x4)
append_in(x1, x2, x3)  =  append_in(x1, x2)
U5(x1, x2, x3, x4, x5)  =  U5(x1, x5)
append_out(x1, x2, x3)  =  append_out(x3)
U81(x1, x2, x3, x4, x5, x6)  =  U81(x1, x2, x3, x6)
SPLIT_IN(x1, x2, x3, x4)  =  SPLIT_IN(x1, x2)
U61(x1, x2, x3, x4, x5, x6)  =  U61(x1, x2, x3, x6)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

SPLIT_IN(cons(X, L), Y, cons(X, L1), L2) → U61(X, L, Y, L1, L2, less_in(X, Y))
SPLIT_IN(cons(X, L), Y, L1, cons(X, L2)) → U81(X, L, Y, L1, L2, geq_in(X, Y))
U81(X, L, Y, L1, L2, geq_out(X, Y)) → SPLIT_IN(L, Y, L1, L2)
U61(X, L, Y, L1, L2, less_out(X, Y)) → SPLIT_IN(L, Y, L1, L2)

The TRS R consists of the following rules:

less_in(s(X), s(Y)) → U10(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
geq_in(s(X), s(Y)) → U11(X, Y, geq_in(X, Y))
geq_in(s(X), 0) → geq_out(s(X), 0)
geq_in(X, X) → geq_out(X, X)
U10(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U11(X, Y, geq_out(X, Y)) → geq_out(s(X), s(Y))

The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons(x1, x2)
geq_in(x1, x2)  =  geq_in(x1, x2)
s(x1)  =  s(x1)
U11(x1, x2, x3)  =  U11(x3)
0  =  0
geq_out(x1, x2)  =  geq_out
less_in(x1, x2)  =  less_in(x1, x2)
U10(x1, x2, x3)  =  U10(x3)
less_out(x1, x2)  =  less_out
U81(x1, x2, x3, x4, x5, x6)  =  U81(x1, x2, x3, x6)
SPLIT_IN(x1, x2, x3, x4)  =  SPLIT_IN(x1, x2)
U61(x1, x2, x3, x4, x5, x6)  =  U61(x1, x2, x3, x6)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

SPLIT_IN(cons(X, L), Y) → U81(X, L, Y, geq_in(X, Y))
U61(X, L, Y, less_out) → SPLIT_IN(L, Y)
U81(X, L, Y, geq_out) → SPLIT_IN(L, Y)
SPLIT_IN(cons(X, L), Y) → U61(X, L, Y, less_in(X, Y))

The TRS R consists of the following rules:

less_in(s(X), s(Y)) → U10(less_in(X, Y))
less_in(0, s(X)) → less_out
geq_in(s(X), s(Y)) → U11(geq_in(X, Y))
geq_in(s(X), 0) → geq_out
geq_in(X, X) → geq_out
U10(less_out) → less_out
U11(geq_out) → geq_out

The set Q consists of the following terms:

less_in(x0, x1)
geq_in(x0, x1)
U10(x0)
U11(x0)

We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

U11(X, L, S, split_out(L, X, L1, L2)) → QS_IN(L1, S1)
U21(X, L, S, L2, qs_out(L1, S1)) → QS_IN(L2, S2)
U11(X, L, S, split_out(L, X, L1, L2)) → U21(X, L, S, L2, qs_in(L1, S1))
QS_IN(cons(X, L), S) → U11(X, L, S, split_in(L, X, L1, L2))

The TRS R consists of the following rules:

qs_in(cons(X, L), S) → U1(X, L, S, split_in(L, X, L1, L2))
split_in(cons(X, L), Y, L1, cons(X, L2)) → U8(X, L, Y, L1, L2, geq_in(X, Y))
geq_in(s(X), s(Y)) → U11(X, Y, geq_in(X, Y))
geq_in(s(X), 0) → geq_out(s(X), 0)
geq_in(X, X) → geq_out(X, X)
U11(X, Y, geq_out(X, Y)) → geq_out(s(X), s(Y))
U8(X, L, Y, L1, L2, geq_out(X, Y)) → U9(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in(cons(X, L), Y, cons(X, L1), L2) → U6(X, L, Y, L1, L2, less_in(X, Y))
less_in(s(X), s(Y)) → U10(X, Y, less_in(X, Y))
less_in(0, s(X)) → less_out(0, s(X))
U10(X, Y, less_out(X, Y)) → less_out(s(X), s(Y))
U6(X, L, Y, L1, L2, less_out(X, Y)) → U7(X, L, Y, L1, L2, split_in(L, Y, L1, L2))
split_in([], X, [], []) → split_out([], X, [], [])
U7(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, cons(X, L1), L2)
U9(X, L, Y, L1, L2, split_out(L, Y, L1, L2)) → split_out(cons(X, L), Y, L1, cons(X, L2))
U1(X, L, S, split_out(L, X, L1, L2)) → U2(X, L, S, L2, qs_in(L1, S1))
qs_in([], []) → qs_out([], [])
U2(X, L, S, L2, qs_out(L1, S1)) → U3(X, L, S, S1, qs_in(L2, S2))
U3(X, L, S, S1, qs_out(L2, S2)) → U4(X, L, S, append_in(S1, cons(X, S2), S))
append_in(cons(X, L1), L2, cons(X, L3)) → U5(X, L1, L2, L3, append_in(L1, L2, L3))
append_in([], L, L) → append_out([], L, L)
U5(X, L1, L2, L3, append_out(L1, L2, L3)) → append_out(cons(X, L1), L2, cons(X, L3))
U4(X, L, S, append_out(S1, cons(X, S2), S)) → qs_out(cons(X, L), S)

The argument filtering Pi contains the following mapping:
qs_in(x1, x2)  =  qs_in(x1)
cons(x1, x2)  =  cons(x1, x2)
U1(x1, x2, x3, x4)  =  U1(x1, x4)
split_in(x1, x2, x3, x4)  =  split_in(x1, x2)
U8(x1, x2, x3, x4, x5, x6)  =  U8(x1, x2, x3, x6)
geq_in(x1, x2)  =  geq_in(x1, x2)
s(x1)  =  s(x1)
U11(x1, x2, x3)  =  U11(x3)
0  =  0
geq_out(x1, x2)  =  geq_out
U9(x1, x2, x3, x4, x5, x6)  =  U9(x1, x6)
U6(x1, x2, x3, x4, x5, x6)  =  U6(x1, x2, x3, x6)
less_in(x1, x2)  =  less_in(x1, x2)
U10(x1, x2, x3)  =  U10(x3)
less_out(x1, x2)  =  less_out
U7(x1, x2, x3, x4, x5, x6)  =  U7(x1, x6)
[]  =  []
split_out(x1, x2, x3, x4)  =  split_out(x3, x4)
U2(x1, x2, x3, x4, x5)  =  U2(x1, x4, x5)
qs_out(x1, x2)  =  qs_out(x2)
U3(x1, x2, x3, x4, x5)  =  U3(x1, x4, x5)
U4(x1, x2, x3, x4)  =  U4(x4)
append_in(x1, x2, x3)  =  append_in(x1, x2)
U5(x1, x2, x3, x4, x5)  =  U5(x1, x5)
append_out(x1, x2, x3)  =  append_out(x3)
QS_IN(x1, x2)  =  QS_IN(x1)
U21(x1, x2, x3, x4, x5)  =  U21(x1, x4, x5)
U11(x1, x2, x3, x4)  =  U11(x1, x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ PiDPToQDPProof
QDP
                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

U21(X, L2, qs_out(S1)) → QS_IN(L2)
QS_IN(cons(X, L)) → U11(X, split_in(L, X))
U11(X, split_out(L1, L2)) → U21(X, L2, qs_in(L1))
U11(X, split_out(L1, L2)) → QS_IN(L1)

The TRS R consists of the following rules:

qs_in(cons(X, L)) → U1(X, split_in(L, X))
split_in(cons(X, L), Y) → U8(X, L, Y, geq_in(X, Y))
geq_in(s(X), s(Y)) → U11(geq_in(X, Y))
geq_in(s(X), 0) → geq_out
geq_in(X, X) → geq_out
U11(geq_out) → geq_out
U8(X, L, Y, geq_out) → U9(X, split_in(L, Y))
split_in(cons(X, L), Y) → U6(X, L, Y, less_in(X, Y))
less_in(s(X), s(Y)) → U10(less_in(X, Y))
less_in(0, s(X)) → less_out
U10(less_out) → less_out
U6(X, L, Y, less_out) → U7(X, split_in(L, Y))
split_in([], X) → split_out([], [])
U7(X, split_out(L1, L2)) → split_out(cons(X, L1), L2)
U9(X, split_out(L1, L2)) → split_out(L1, cons(X, L2))
U1(X, split_out(L1, L2)) → U2(X, L2, qs_in(L1))
qs_in([]) → qs_out([])
U2(X, L2, qs_out(S1)) → U3(X, S1, qs_in(L2))
U3(X, S1, qs_out(S2)) → U4(append_in(S1, cons(X, S2)))
append_in(cons(X, L1), L2) → U5(X, append_in(L1, L2))
append_in([], L) → append_out(L)
U5(X, append_out(L3)) → append_out(cons(X, L3))
U4(append_out(S)) → qs_out(S)

The set Q consists of the following terms:

qs_in(x0)
split_in(x0, x1)
geq_in(x0, x1)
U11(x0)
U8(x0, x1, x2, x3)
less_in(x0, x1)
U10(x0)
U6(x0, x1, x2, x3)
U7(x0, x1)
U9(x0, x1)
U1(x0, x1)
U2(x0, x1, x2)
U3(x0, x1, x2)
append_in(x0, x1)
U5(x0, x1)
U4(x0)

We have to consider all (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


QS_IN(cons(X, L)) → U11(X, split_in(L, X))
The remaining pairs can at least be oriented weakly.

U21(X, L2, qs_out(S1)) → QS_IN(L2)
U11(X, split_out(L1, L2)) → U21(X, L2, qs_in(L1))
U11(X, split_out(L1, L2)) → QS_IN(L1)
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(QS_IN(x1)) = x1   
POL(U1(x1, x2)) = 0   
POL(U10(x1)) = 0   
POL(U11(x1)) = 1   
POL(U11(x1, x2)) = x2   
POL(U2(x1, x2, x3)) = 0   
POL(U21(x1, x2, x3)) = x2   
POL(U3(x1, x2, x3)) = 0   
POL(U4(x1)) = 0   
POL(U5(x1, x2)) = 1 + x2   
POL(U6(x1, x2, x3, x4)) = 1 + x2   
POL(U7(x1, x2)) = 1 + x2   
POL(U8(x1, x2, x3, x4)) = x2 + x4   
POL(U9(x1, x2)) = 1 + x2   
POL([]) = 0   
POL(append_in(x1, x2)) = 1 + x1 + x2   
POL(append_out(x1)) = 1 + x1   
POL(cons(x1, x2)) = 1 + x2   
POL(geq_in(x1, x2)) = 1   
POL(geq_out) = 1   
POL(less_in(x1, x2)) = 0   
POL(less_out) = 0   
POL(qs_in(x1)) = 0   
POL(qs_out(x1)) = 0   
POL(s(x1)) = 0   
POL(split_in(x1, x2)) = x1   
POL(split_out(x1, x2)) = x1 + x2   

The following usable rules [17] were oriented:

U8(X, L, Y, geq_out) → U9(X, split_in(L, Y))
split_in([], X) → split_out([], [])
geq_in(s(X), s(Y)) → U11(geq_in(X, Y))
split_in(cons(X, L), Y) → U8(X, L, Y, geq_in(X, Y))
U6(X, L, Y, less_out) → U7(X, split_in(L, Y))
split_in(cons(X, L), Y) → U6(X, L, Y, less_in(X, Y))
geq_in(s(X), 0) → geq_out
U9(X, split_out(L1, L2)) → split_out(L1, cons(X, L2))
geq_in(X, X) → geq_out
U7(X, split_out(L1, L2)) → split_out(cons(X, L1), L2)
U11(geq_out) → geq_out



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ PiDPToQDPProof
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

U21(X, L2, qs_out(S1)) → QS_IN(L2)
U11(X, split_out(L1, L2)) → U21(X, L2, qs_in(L1))
U11(X, split_out(L1, L2)) → QS_IN(L1)

The TRS R consists of the following rules:

qs_in(cons(X, L)) → U1(X, split_in(L, X))
split_in(cons(X, L), Y) → U8(X, L, Y, geq_in(X, Y))
geq_in(s(X), s(Y)) → U11(geq_in(X, Y))
geq_in(s(X), 0) → geq_out
geq_in(X, X) → geq_out
U11(geq_out) → geq_out
U8(X, L, Y, geq_out) → U9(X, split_in(L, Y))
split_in(cons(X, L), Y) → U6(X, L, Y, less_in(X, Y))
less_in(s(X), s(Y)) → U10(less_in(X, Y))
less_in(0, s(X)) → less_out
U10(less_out) → less_out
U6(X, L, Y, less_out) → U7(X, split_in(L, Y))
split_in([], X) → split_out([], [])
U7(X, split_out(L1, L2)) → split_out(cons(X, L1), L2)
U9(X, split_out(L1, L2)) → split_out(L1, cons(X, L2))
U1(X, split_out(L1, L2)) → U2(X, L2, qs_in(L1))
qs_in([]) → qs_out([])
U2(X, L2, qs_out(S1)) → U3(X, S1, qs_in(L2))
U3(X, S1, qs_out(S2)) → U4(append_in(S1, cons(X, S2)))
append_in(cons(X, L1), L2) → U5(X, append_in(L1, L2))
append_in([], L) → append_out(L)
U5(X, append_out(L3)) → append_out(cons(X, L3))
U4(append_out(S)) → qs_out(S)

The set Q consists of the following terms:

qs_in(x0)
split_in(x0, x1)
geq_in(x0, x1)
U11(x0)
U8(x0, x1, x2, x3)
less_in(x0, x1)
U10(x0)
U6(x0, x1, x2, x3)
U7(x0, x1)
U9(x0, x1)
U1(x0, x1)
U2(x0, x1, x2)
U3(x0, x1, x2)
append_in(x0, x1)
U5(x0, x1)
U4(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 3 less nodes.